const timeSetting = require('../timeSetting/timeSetting')

const formColumnsLast = [
  {
    dataIndex: 'Title',
    key: 'Title',
    align: 'center',
    width: 100,
    onCell: (_) => {
      if (_?.rowSpan === 4) {
        return {
          rowSpan: 4,
          style: {
            fontWeight: 600,
            fontSize: 16,
          },
        }
      }
      if (_?.rowSpan === 2) {
        return {
          rowSpan: 1,
          colSpan: 2,
          style: {
            fontWeight: 600,
            fontSize: 16,
          },
        }
      }
      return { rowSpan: 0 }
    },
  },
  {
    dataIndex: 'InOut',
    key: 'InOut',
    width: 35,
    align: 'center',
    onCell: (_) => {
      if (_?.rowSpan === 2) {
        return {
          rowSpan: 0,
        }
      }
    },
  },
  {
    title: (
      <div className="formColumnsTitle">
        <p>Sun</p>
        <span>{timeSetting.getSunDay()}</span>
      </div>
    ),
    dataIndex: 'sunday',
    key: 'sunday',
    align: 'center',
    width: 120,
  },
  {
    title: (
      <div className="formColumnsTitle">
        <p>Mon</p>
        <span>{timeSetting.getMonDay()}</span>
      </div>
    ),
    dataIndex: 'monday',
    key: 'monday',
    align: 'center',
  },
  {
    title: (
      <div className="formColumnsTitle">
        <p>Tue</p>
        <span>{timeSetting.getTueDay()}</span>
      </div>
    ),
    dataIndex: 'tuesday',
    key: 'tuesday',
    align: 'center',
  },
  {
    title: (
      <div className="formColumnsTitle">
        <p>Wed</p>
        <span>{timeSetting.getWedDay()}</span>
      </div>
    ),
    dataIndex: 'wednesday',
    key: 'wednesday',
    align: 'center',
  },
  {
    title: (
      <div className="formColumnsTitle">
        <p>Thu</p>
        <span>{timeSetting.getThuDay()}</span>
      </div>
    ),
    dataIndex: 'thursday',
    key: 'thursday',
    align: 'center',
  },
  {
    title: (
      <div className="formColumnsTitle">
        <p>Fri</p>
        <span>{timeSetting.getFriDay()}</span>
      </div>
    ),
    dataIndex: 'friday',
    key: 'friday',
    align: 'center',
  },
  {
    title: (
      <div className="formColumnsTitle">
        <p>Sat</p>
        <span>{timeSetting.getSatDay()}</span>
      </div>
    ),
    dataIndex: 'saturday',
    key: 'saturday',
    align: 'center',
  },
  {
    title: (
      <div className="formColumnsTitle">
        <p>Total</p>
        <span>Hours</span>
      </div>
    ),
    dataIndex: 'total',
    key: 'total',
    align: 'center',
  },
]

const formDataLast = [
  {
    key: '0',
    Title: 'OHAT',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    InOut: 'in',
    rowSpan: 4,
  },
  {
    key: '1',
    Week: 'out',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',

    total: '',
    InOut: 'out',
  },
  {
    key: '2',
    Week: 'in',
    sunday: '',
    monday: '12:02 PM',
    tuesday: '12:00 PM',
    wednesday: '',
    thursday: '12:00 PM',
    friday: '12:00 PM',
    saturday: '',
    total: '',
    InOut: 'in',
  },
  {
    key: '3',
    Week: 'In',
    sunday: '',
    monday: '1:00 PM',
    tuesday: '1:00 PM',
    wednesday: '',
    thursday: '1:00 PM',
    friday: '1:00 PM',
    saturday: '',
    total: '',
    InOut: 'out',
  },
  {
    key: '4',
    Title: 'OHAT Hours',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    rowSpan: 2,
  },
  {
    key: '5',
    Title: 'CLA',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    InOut: 'in',
    rowSpan: 4,
  },
  {
    key: '6',
    Title: 'OHAT Hours',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    InOut: 'out',
  },
  {
    key: '7',
    Title: 'OHAT Hours',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    InOut: 'in',
  },
  {
    key: '8',
    Title: 'OHAT Hours',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    InOut: 'out',
  },
  {
    key: '9',
    Title: 'CLA Hours',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    rowSpan: 2,
  },
  {
    key: '10',
    Title: 'Holiday',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    rowSpan: 2,
  },
  {
    key: '11',
    Title: 'POT',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    rowSpan: 2,
  },
  {
    key: '12',
    Title: 'Total Hours',
    sunday: '',
    monday: '7:58 AM',
    tuesday: '8:00 AM',
    wednesday: '',
    thursday: '8:00 AM',
    friday: '7:45 AM',
    saturday: '',
    total: '',
    rowSpan: 2,
  },
]
module.exports = { formColumnsLast, formDataLast }
